<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Buildings extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('buildings',function(Blueprint $table){
            $table->engine="InnoDB";
            $table->increments('id');
            $table->string('name');
            $table->text('info');
            $table->string('username');
            $table->string('phone');
            $table->integer('attach_id');
            $table->float('prize',6,2);
            $table->integer('area_id');
            $table->integer('type_id');
            $table->integer('vote');
            $table->integer('count');
            $table->char('logo');
            $table->integer('vote_count');
            $table->integer('vote_star'); //七星排行数
            $table->string('location');
            $table->double('lat', 12, 6);
            $table->double('long', 12, 6);
            $table->integer("valid")->default(1); //有效数据
            $table->rememberToken();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('buildings');
    }
}
